<template>
  <div>
    Event Bus实现兄弟组件传参
    <EventBusA />
    <EventBusB />
    <button type="button" @click="handleClick">父组件点击传参</button>
  </div>
</template>

<script setup lang="ts">
import EventBusA from './EventBusA.vue';
import EventBusB from './EventBusB.vue';
import mitter from '../../../utils/eventBus'

function  handleClick () {
   mitter.emit('msg', 'ParentValue')
}
</script>

